package com.coke.spring.sentinel.common;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author cwm
 * @Description TODO
 * @date 2021/8/31 上午11:09
 * @Version 1.0
 */
@Data
public class Order {
    private String id;
    private Double price;
    private String productId;

    public Order(String id, Double price, String productId) {
        this.id = id;
        this.price = price;
        this.productId = productId;
    }

    public static final List<Order> orderList = new ArrayList<Order>() {{
        add(new Order("1",1000D,"1"));
        add(new Order("2",2000D,"2"));
        add(new Order("3",3000D,"3"));
        add(new Order("4",4000D,"4"));
        add(new Order("5",5000D,"5"));
    }};

    @Override
    public String toString() {
        return "Order{" +
                "id='" + id + '\'' +
                ", price=" + price +
                ", productId='" + productId + '\'' +
                '}';
    }
}
